{% extends 'CatalogCommonBundle:Catalog:07_schema.html.twig' %}
{% use 'CatalogMercedesBundle::mercedes.base.html.twig' %}
{% block breadcrumbs %}
    <a href="{{ path('articul_mercedes_find') }}">Выбрать регион, модель, модификацию</a> /
    <a href="{{ path('articul_mercedes_complectations', parameters) }}">Выбрать комплектацию</a> /
    <a href="{{ path('articul_mercedes_groups', parameters) }}">Выбрать группу запчастей</a> /
    <a href="{{ path('articul_mercedes_subgroups', parameters) }}">Выбрать подгруппу запчастей</a> /
    <a href="{{ path('articul_mercedes_schemas', parameters) }}">Выбрать схему</a> / Выбрать запчасть
{% endblock breadcrumbs %}

{% block complectation %}{% endblock complectation %}
{% set schema = oContainer.getActiveSchema %}
{% block image %}
    <img src="{{ asset('bundles/catalogmercedes/images/BM_IMAGES/'~schema.getCode~'.png')|file_exists() ? asset('bundles/catalogmercedes/images/BM_IMAGES/'~schema.getCode~'.png') : asset('bundles/catalogmercedes/images/BM_IMAGES_ARC/'~schema.getCode~'.png') }}" width="100%" usemap="#{{ schema.getCode }}" alt="{{ schema.getRuname }}"/>
{% endblock image %}

{% block ajaxUrl %}{{ path('articul_mercedes_articuls') }}{% endblock ajaxUrl %}
{% block ajaxData %}
    {{ parent() }}
    , groupCode: '{{ parameters.groupCode }}', complectationCode: '{{ parameters.complectationCode }}'
{% endblock ajaxData %}
{% block commonArticulPath %}{{ constant('Catalog\\CommonBundle\\Components\\Constants::FIND_PATH') }}{{ commonArticul.getCode }}{% endblock commonArticulPath %}
{% block subGroupPath %}{% endblock subGroupPath %}
{% block pncScript %}
    {% if pnc.isActive %}
        <script>
            $(document).ready(function(){
                {{ block('pncClick') }}
            });
        </script>

    {% endif %}
    {{ parent() }}
{% endblock pncScript %}
{% set a = [] %}
{% for pnc in oContainer.getActiveSchema.getPncs %}
    {% if pnc.isActive %}
        {% set a = a|merge([pnc.getCode]) %}
    {% endif %}
{% endfor %}
{% block activeLabel %}{{ a|join(',') }}{% endblock activeLabel %}
